package org.lwj.web.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.lwj.common.annotation.CryptEntity;
import org.lwj.common.annotation.CryptField;
import org.lwj.common.enmus.EncryptTypeEnum;

@Data
@TableName("user")
@CryptEntity
public class User {
    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    private String name;
    private Integer age;
    @CryptField(type = EncryptTypeEnum.AES)
    private String email;
}